package com.sx.entity.design;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sx.basic.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.List;

/**
 * @author AdinZ
 * @date 2020/11/12 16:55
 * 页面
 */
@Data
@NoArgsConstructor
@TableName(value = "sx_design_page")
@Entity
@Table(name = "sx_design_page")
@ApiModel(description = "页面数据")
public class PageEntity extends BasicEntity {
    @Id
    @GeneratedValue
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    @ApiModelProperty("页面唯一值")
    private String pagekey;
    @ApiModelProperty("页面名称")
    private String pageName;
    @ApiModelProperty("页面类型")
    @Enumerated(EnumType.STRING)
    private Type type;
    private long created=System.currentTimeMillis();
    @TableField(exist = false)
    private @Transient List<PageModuleEntity> list;

    public enum Type{
        App,
        H5,
        PC,
        //小程序
        MINI_PG
    }

}
